package com.file;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;

public class PrintW {
	public static void main(String[] args) {

		String filePath = "C:" + File.separator + "zzz" + File.separator;
		File file = new File(filePath, "123.txt");
		 printwriter(file);
		System.out.println("ok");

	}

	private static void printwriter(File file) {
		try {
			String s = "123321ads";
			PrintWriter printWriter = new PrintWriter(file);
			printWriter.write(s);
			printWriter.flush();
			printWriter.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

}
